<template>
    <!-- 页面级别共用的 -->
    <!-- 试卷列表 -->
    <AppPageTopInfo title="我的试卷" :subTitle="subTitle">

    </AppPageTopInfo>

    <AppPageContent :opApi="opApi" :cols="3">
        <template v-slot="{ item }">
            <div class="box p-2">
                <div class="">

                    <AppImg :src="item.cover" style="border-radius: 5px;"></AppImg>
                </div>

                <h5 class="text-lg fw-bold mb-2 mt-4 chover">
                    <router-link :to="'/paper-detail?id=' + item.id">
                        {{ item.title }}
                    </router-link>
                </h5>
                <p class="text-sm">{{ item.intro }}</p>
                <div class="flex justify-between items-center mt-2 mb-4">
                    <!-- <div>
                        {{ item.paperQuestionGroups.map(it => it.title + it.paperQuestions.length).join(' ') }}
                    </div> -->
                    <button class="btn-enter" @click="$router.push('/paper-detail?id=' + item.id)">查看试卷</button>
                </div>

            </div>
        </template>

    </AppPageContent>

</template>
<script setup>
import opApi from "@/api/paperApi.js"
defineProps({
    title: {
        type: String,
        default: "标题"
    },
    subTitle: {
        type: String,
        default: "副标题"
    }
})
</script>